<% content_for :page_head do %>
  <h1>所有用户</h1>
<% end %>

<table cellspacing="0" cellpadding="0">
  <thead>
  <tr>
    <th>登录名</th>
    <th>姓名</th>
    <th>Email</th>
    <th>Role</th>
  </tr>
  </thead>
  <tbody>
<% for user in @users %>
  <tr class="<%= cycle("even","odd") %>">
    <td><%= link_to user.login, edit_admin_user_path(user) %></td>
    <td><%= user.name %></td>
    <td><%= user.email %></td>
    <td>
    <% for role in user.roles %>
      <%= role.name %>
    <% end %>
    </td>
  </tr>
<% end %>
  </tbody>
</table>